/*
@Objet 
@Page page source en String
*/
function ActionSelect(Objet,Page) {
	i = Objet.selectedIndex;
	if (i == 0) return;
	if (i == -1) return;
	classe = Objet.options[i].value;
	url = "index.php?module="+Page+"&code="+ Objet.options[i].value;
	parent.location.href = url;
}

//<!--
function moveOver(elem1,elem2){
	var choiceBox = document.getElementById(elem1);
	var avaible = document.getElementById(elem2);
	
	var boxLength=choiceBox.length;
	var selectedItem=avaible.selectedIndex;
	var selectedText=avaible.options[selectedItem].text;
	var selectedValue=avaible.options[selectedItem].value;
	var i;
	var isNew=true;
	
	if (boxLength !=0) {
		for (i=0;i<boxLength; i++) {
		thisitem=choiceBox.options[i].text;
			if (thisitem == selectedText) {
				isNew=false;
				break;
			}
		}
	}
	if (isNew) {
		newoption=new Option(selectedText, selectedValue, false, false);
		choiceBox.options[boxLength]=newoption;
	}
	avaible.selectedIndex=-1;
}//end of function

function removeMe(elem1) {
	var choiceBox = document.getElementById(elem1);
	
	var boxLength=choiceBox.length;
	arrSelected=new Array();
	var count=0;
	for (i=0;i<boxLength; i++) {
		if (choiceBox.options[i].selected) {
			arrSelected[count]=choiceBox.options[i].value;
		}
		count++;
	}
		for (i=0; i<boxLength; i++) {
		for (x=0; x<arrSelected.length; x++) {
			if (choiceBox.options[i].value == arrSelected[x]) {
				choiceBox.options[i]=null;
			}//end of if (document...)
		}//end of for(x=...)
		boxLength=choiceBox.length;
	}//end of for(i=...)
}//end of function
//-->

function selectAll(selectBox,selectAll) { 
    // have we been passed an ID 
    if (typeof selectBox == "string") { 
        selectBox = document.getElementById(selectBox);
    } 
    // is the select box a multiple select box? 
    if (selectBox.type == "select-multiple") {
        for (var i = 0; i < selectBox.options.length; i++) { 
             selectBox.options[i].selected = selectAll; 
        }
    	
    }
}